package cn.boot1112.springboot1112;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @RestController：@Controller  + @ResponseBody
 * @RequestMapping:路径映射
 * localhost:8080/项目名/访问的资源名
 * SpringBoot项目默认不需要项目名，即：
 * localhost:8080
 */

@RestController
@RequestMapping("/hello")
public class HelloWorld {

    @RequestMapping("/hello1112")
    public String showHello(){
        System.err.println("11111");
        return "欢迎使用SpringBoot！";
    }

}
